package factory.simpleFactory;

import factory.base.IPhone;
import factory.base.MiPhone;
import factory.base.Phone;
import factory.base.PhoneType;

/**
 * @author: whh
 * @Date: 2021/6/7
 * @Description:
 */
public class PhoneFactory {

    public Phone makePhone(PhoneType phoneType){
        switch (phoneType){
            case IPhone:return new IPhone();

            case MiPhone:return new MiPhone();

            default:return null;
        }
    }
}
